#include "GameController.h"
#include "GameManager.h"
#include "MenuManager.h"

GameController::GameController()
	:m_inGame(false)
{
	m_gameManager = new GameManager;
	m_menuManager = new MenuManager(m_gameManager, this);
	m_menuManager->SetMenu(m_menuManager->GetStartingMenu());
}

GameController::~GameController()
{
	delete m_menuManager;
	delete m_gameManager;
}

void GameController::Run()
{
	m_inGame = true;

	while(m_inGame)
	{
		m_menuManager->Run();
	}
}

void GameController::Quit()
{
	m_inGame = false;
}

void GameController::Restart()
{
	m_gameManager->Restart();
}

void GameController::Simulate(const bool i_doNotPrompt)
{
	m_gameManager->Simulate(i_doNotPrompt);
}

void GameController::EndSeason(const bool i_doNotPrompt, STD::stringstream& o_message)
{
	m_gameManager->EndSeason(i_doNotPrompt, o_message);
}


bool GameController::Save(const char* const filename)
{
	return m_gameManager->Save(filename);
}

bool GameController::Load(const char* const filename)
{
	return m_gameManager->Load(filename);
}
